package lab02.test17;

public class Array {
    public static void main(String[] args) {
      /*  int num[] = {10,55,65,15,65,48,87,89,99,88};

//        int j = 0;
//        variable 变量
        for (int i = 0; num[i] <= num[i+1]; i++){
//        System.out.println("最大：" + num[i]);
            for ()

        }*/
      int[] num = new int[10];

      num[0] = 10;
      num[1] = 55;
      num[2] = 65;
      num[3] = 15;
      num[4] = 65;
      num[5] = 48;
      num[6] = 87;
      num[7] = 89;
      num[8] = 99;
      num[9] = 88;

      int max = 0;
      for (int i=0;i<num.length;i++){
          if (num[i]>max){
              max = num[i];

          }

      }

      int min = 0;
        for (int i = 0;i<num.length;i++){
            if (num[i]<min){
                min = num[i];
            }
        }

        int sum = 0;
       // int i = 0;

        for (int i=0;i<10;i++){
            sum += num[i];
        }

        System.out.println("sum:" + sum);
        System.out.println("max:" + max);
        System.out.println("min:" + min);
    }
}
